<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      * {
        padding: 0;
        margin: 0;
        box-sizing: border-box;
      }

      main {
        width: 500px;
        height: 300px;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        background: #34495e;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
      }

      .field {
        position: relative;
        overflow: hidden;
        margin-bottom: 20px;
      }

      .field::before {
        content: '';
        position: absolute;
        left: 0;
        height: 2px;
        bottom: 0;
        width: 100%;
        background: linear-gradient(to right, white, #1abc9c, #f1c40f, #e74c3c, white);
        transform: translateX(-100%);
        transition: 2s;
      }

      .field:hover::before {
        transform: translateX(100%);
      }

      input {
        border: none;
        outline: none;
        padding: 15px 10px;
      }
    </style>
  </head>
  <body>
    <main>
      <div class="field">
        <input type="text" placeholder="请输入后盾人帐号" />
      </div>
      <div class="field">
        <input type="text" placeholder="请输入密码" />
      </div>
    </main>
  </body>
</html>
